
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim wsRf As New WsRF.Service
        Dim ds As New Data.DataSet

        Try
            ds = wsRf.SqlEjecutaSql("", "select unique(nro_asn) from asn_recibido where nro_asn = " + TextBox1.Text)

            If Not IsNothing(ds) Then
                If ds.Tables.Count > 0 Then
                    If ds.Tables(0).Rows.Count < 0 Then
                        TextBox2.Text = ds.Tables(0).Rows(0)("nro_asn").ToString().Trim()
                    End If
                End If
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub
End Class
